﻿using System.Data;
using MyFloridaHouse.libSvDTO;

namespace MyFloridaHouse.DataAccess.Extensions
{
	/// <summary>
	/// ACSDistrictSummaryReportDefinitionDTODataContract
	/// </summary>
    public static class ACSDistrictSummaryReportDefinitionDTODataContract
    {
		/// <summary>
		/// DataContract.
		/// </summary>
		/// <param name="rdr">The RDR.</param>
		/// <returns>Object: <see cref="ACSDistrictSummaryReportDefinitionDTO"/></returns>
        public static ACSDistrictSummaryReportDefinitionDTO DataContract(IDataReader rdr)
        {
            var newItem = new ACSDistrictSummaryReportDefinitionDTO
                          	{
                          		detailDesc = rdr["detailDesc"].ToString(),
                          		dictionaryID = (int) rdr["dictionaryID"],
                          		tableID = rdr["tblid"].ToString(),
                          		header = rdr["header"].ToString(),
                          		level = (int) rdr["level"],
                          		parentDictionaryID = (int) rdr["parentDictionaryID"],
                          		stateWide = rdr["stateWide"].ToString(),
                          		stateWidePercent = rdr["stateWidePercent"].ToString(),
                          		subject_area = rdr["subject_area"].ToString()
                          	};
			return newItem;
        }


    }
}
